Post

Replies

Boosts

Views

Activity

Xcode 16 Typed Allocators
From the Xcode 16 Release notes: Clang New Features Clang now supports generating code to call typed allocators. To enable this support for C allocation functions such as malloc() set the CLANG_ENABLE_C_TYPED_ALLOCATOR_SUPPORT build setting to YES. For C++ allocations with operator new, set CLANG_ENABLE_CPLUSPLUS_TYPED_ALLOCATOR_SUPPORT to YES. (132456928) Looking in the Build Settings I don't see anything that says Typed Allocator or something similar. I would love to have a bit more information about what this is as well.
2
1
195
Sep ’24
Symbol not found in flat namespace with [NSBundle load]
I am having an issue with Xcode 15 when I create an archive build of my application. The general structure I something like: Main Application: Links to staticLib.a Plugins: use datatypes in staticLib.a When I build an archive build and load the bundle for the plugin, I get the following type of errors: Error Domain=NSCocoaErrorDomain Code=3588 "dlopen(pluginBinary, 0x0109): symbol not found in flat namespace '_OBJC_CLASS_$_FIRST_MISSING_CLASS'" This program runs fine and finds the plugins without issues if I run the program from Xcode. It also will run and find the plugins correctly if I build a release build using xcodebuild. Only if I use Archive does it fail to load these files in the flat namespace. The plugins and the main binary say they use the TWOLEVEL namespace using otool -hV on them. If I link the static library to the plugin, I get undefined behavior because both are linking to the same binary. The plugins are using: -undefined dynamic_lookup in their linker flags. Any ideas how to resolve this? Thanks, Steven
4
0
354
Sep ’24
-[USRVWebViewCallback invoke:] crash on launch
Starting at 7 am many of our apps are crashing on launch from the -[USRVWebViewCallback invoke:] EXC_BAD_ACCESS: Attempted to dereference garbage pointer 0x20. This is coming across OS versions and does not seem to be related to our code as many different applications are crashing. Did Apple turn something on this morning?
3
2
797
Aug ’24
CALayer position contains NaN: [nan 0].
I'm getting a crash on iOS 14.4.1 and other older versions when entering text into a UITextBox in my game. I tried disabling auto correct on the field and it seemed to make the issue occur less often, but it is not solving 100% of the cases. Does anyone know how to prevent this exception and turn off auto complete on the text field entirely? None of the call stack is actually my code other than main. Update: I am already setting self.textInput.autocorrectionType = UITextAutocorrectionTypeNo; 0 CoreFoundation +0x125868 ___exceptionPreprocess 1 libobjc.A.dylib +0x6c4c _objc_exception_throw 2 CoreFoundation +0x1e4a0 +[NSException raise:format:] 3 QuartzCore +0x16adb0 CA::Layer::set_position(CA::Vec2<double> const&, bool) 4 QuartzCore +0x16ace0 -[CALayer setPosition:] 5 QuartzCore +0x16a7b8 -[CALayer setFrame:] 6 UIKitCore +0x10f8184 -[UIView(Geometry) setFrame:] 7 UIKitCore +0x9b7038 -[UIKeyboardImpl updateAutocorrectPrompt:correctionRects:] 8 UIKitCore +0x9b6a54 -[UIKeyboardImpl updateAutocorrectPrompt:executionContext:] 9 UIKitCore +0x9d5274 ___56-[UIKeyboardScheduledTask handleDeferredTimerFiredEvent]_block_invoke 10 UIKitCore +0x9d57d8 -[UIKeyboardTaskEntry execute:] 11 UIKitCore +0x9d420c -[UIKeyboardTaskQueue continueExecutionOnMainThread] 12 UIKitCore +0x9d518c -[UIKeyboardScheduledTask handleDeferredTimerFiredEvent] 13 CoreFoundation +0x12a8f0 ___invoking___ 14 CoreFoundation +0x1df4 -[NSInvocation invoke] 15 UIKitCore +0xfa5778 -[_UIActionWhenIdle invoke] 16 CoreFoundation +0xa0354 ___CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ 17 CoreFoundation +0x9a5c0 ___CFRunLoopDoObservers 18 CoreFoundation +0x9ab70 ___CFRunLoopRun 19 CoreFoundation +0x9a218 _CFRunLoopRunSpecific 20 GraphicsServices +0x3780 _GSEventRunModal 21 UIKitCore +0xbc8ee4 -[UIApplication _run] 22 UIKitCore +0xbce758 _UIApplicationMain 23 Wizard-of-Oz +0x20f8268 main (main.mm:38:19) 24 libdyld.dylib +0x16ac _start
0
0
366
Aug ’24
Xcode 15 archiving makes Plugins fail to load
I have a project that has a number of plugins in it. They are compiled and placed in the correct location and the build runs fine in the Debug / Release schemes. If I archive the build with Xcode 15 the resulting build generates a number of errors symbol not found in flat namespace '_OBJC_CLASS_$_XXXX for various classes that are part of the main application including the AppDelegate and other classes. This does not occur with Xcode 14.3.1 or previous versions. It still occurs in Xcode 15.1 beta 1. This happens regardless if I notarize the build with Apple or not. Has anyone seen anything like this? Any ideas how to resolve it? My current workaround is to use xcodebuild to compile a Release build and notarize that build.
1
0
667
Oct ’23
App Crashing in Background [FBSSceneSnapshotRequestHandle performRequestForScene:]
We are getting around 300 crashes per day while the application is in the background coming from [FBSSceneSnapshotRequestHandle performRequestForScene:]. This is a metal based game. Is there some way I can tell iOS to not try to take a snapshot of the game while in the background? Full callstack below. Thanks, 0 libsystem_kernel.dylib +0x18130 _semaphore_wait_trap 1 libdispatch.dylib +0x279c __dispatch_sema4_wait$VARIANT$mp 2 libdispatch.dylib +0x321c __dispatch_semaphore_wait_slow 3 FrontBoardServices +0x3d6c8 -[FBSSceneSnapshotRequestHandle performRequestForScene:] 4 FrontBoardServices +0x438c8 -[FBSSceneSnapshotAction snapshotRequest:performWithContext:] 5 FrontBoardServices +0x158c -[FBSSceneSnapshotRequest performSnapshotWithContext:] 6 UIKitCore +0x8c9338 ___65-[UIApplication _performSnapshotsWithAction:forScene:completion:]_block_invoke_2 7 FrontBoardServices +0x43764 -[FBSSceneSnapshotAction _executeNextRequest] 8 FrontBoardServices +0x43354 -[FBSSceneSnapshotAction executeRequestsWithHandler:completionHandler:expirationHandler:] 9 UIKitCore +0x8c921c ___65-[UIApplication _performSnapshotsWithAction:forScene:completion:]_block_invoke 10 UIKitCore +0x8c8844 -[UIApplication _beginSnapshotSessionForScene:withSnapshotBlock:] 11 UIKitCore +0x8c8f70 -[UIApplication _performSnapshotsWithAction:forScene:completion:] 12 UIKitCore +0x8c8e3c -[UIApplication _handleSnapshotAction:forScene:completion:] 13 UIKitCore +0x8c4720 ___71-[UIApplication _handleSnapshotAction:forScene:deactivationCompletion:]_block_invoke 14 UIKitCore +0x8c453c -[UIApplication _handleSnapshotAction:forScene:deactivationCompletion:] 15 UIKitCore +0x17ff54 ___98-[__UICanvasLifecycleMonitor_Compatability deactivateEventsOnly:withContext:forceExit:completion:]_block_invoke.261 16 UIKitCore +0x8c80a8 __runAfterCACommitDeferredBlocks 17 UIKitCore +0x8b6bf8 __cleanUpAfterCAFlushAndRunDeferredBlocks 18 UIKitCore +0x8e3a68 __afterCACommitHandler 19 CoreFoundation +0xaa4f8 ___CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ 20 CoreFoundation +0xa5220 ___CFRunLoopDoObservers 21 CoreFoundation +0xa579c ___CFRunLoopRun 22 CoreFoundation +0xa4fb0 _CFRunLoopRunSpecific 23 GraphicsServices +0xa798 _GSEventRunModal 24 UIKitCore +0x8bcc34 _UIApplicationMain 25 Wizard-of-Oz +0x1045054 main (main.mm:38:18) 26 libdyld.dylib +0x18dc _start
0
1
993
Jan ’23
openGL iPad game on M1 with 11.3
Previously on 11.2.3 I was able to run my OpenGL game targeting my M1 Mac mini as an iPad game. After updating to macOS 11.3 I am now getting an error in Metal. Is this expected moving forward and a sign that we need to focus on porting to Metal sooner rather than later? -[_MTLFunctionInternal baseObject]: unrecognized selector sent to instance 0x13046dab0 Crashing on: glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, nullptr); Thanks, Steven Behnke
4
0
2.8k
Apr ’21
LLDB RPC Server Crashed (Xcode 12)
We have some developers on our team experiencing a crash while trying to debug. Message from debugger: The LLDB RPC server has crashed. The crash log is located in ~/Library/Logs/DiagnosticReports and has a prefix 'lldb-rpc-server'. Please file a bug and attach the most recent crash log. Fatal error: Invalid position SourceEditorPosition: line: 244, col: 38 with line length 26 : file /Library/Caches/com.apple.xbs/Sources/SourceEditor/SourceEditor-17136/SourceEditor/SourceEditor/CoreEditor/Model/SourceEditorDataSource.swift, line 2710 This is happening with breakpoints in specific spots in our mostly C++ codebase. It is happening in Xcode 12.0.1 and did not happen in the same version of Xcode in our branch without the Widget Extension added. Is there anything we can do? We've reported it with Apple Feedback and heard nothing back. We're going to try to reproduce it on Xcode 12.1.1 RC.
6
0
3.5k
Nov ’20
WidgetKit / SwiftUI Text Timer Centering
I am attempting to format a timer with the code: Text(Date().addingTimeInterval(2400), style: .timer) It does indeed work fine for the content, but the text field appears much longer than it should. I want to center this text under another text entry so I used a VStack, but the timer appears left justified and does not align on center based on the content. If I write my own method to provide just the limited characters I want, I can indeed center it without issue, but this does not countdown once per second for the widget view. I suppose I could get around this by adding 3600 timeline entries for the next hour, but I don't think that would be a great solution. Is there any way to resolve this? I can kind of get around it by adding a frame that fits for the case of 00:00 or 0:00 but not both.
2
2
2.7k
Oct ’20